<!DOCTYPE >
<html>
<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>基本设置</title>
<css  href="__PUBLIC__/system/css/right.css" />
<js href="__PUBLIC__/system/js/jquery.js" />
<js href="__PUBLIC__/system/js/system.js" />
<js href="__PUBLIC__/system/js/admin.js" />
</head>
<body style="overflow: auto;">
	<div class="basic bor">
			<div class="title fl">当前位置：产品管理 > 评论列表</div>
			<div class="basic_r fr"><a href="{:U('Index/setting')}">基本信息</a></div>
	</div> 
<style>
.sou{
       position: absolute;
    top: 43px;
    left: 504px;
}
.kd{
    overflow: auto;
    word-wrap : break-word;
    width:200px; 
    padding: 10px;
    line-height: 10px;
    line-height: 20px !important
}

.pc{  
    position: relative;
    width: 172px;
}
.pics{
    display: block;
    width: 50px;
    height: 48px;
    border: 1px solid #9a9595;
    margin: 0;
    float: left;
    margin-bottom: 5px;
    margin-right: 5px;
    margin-top: 5px;
}
.wrap{
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0, 0.8);
    z-index: 11;
}

.comment{
    position: absolute;
    left: 25%;
    top: 20%;
    width: 63%;
    height: 266px;
    z-index: 20;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    background: #fff;
}
.comment .title{
    width: 98%;
    padding-left: 2%;
    padding-top: 5px;
    padding-bottom: 5px;
    margin-bottom: 10px;
    font-weight: 700;
    background: rgba(171, 165, 165, 0.57);
    overflow: hidden;
}
.comment .close{
     position: absolute;
    right: 10px;
    top: 3px;
    width: 25px;
    height: 25px;
    text-align: center;
    line-height: 25px;
    border-radius: 50%;
    border: 1px solid #5b6b5b;
    
}

.comment .com_from{
    width: 100%;
    overflow: hidden; 
}
.com_form label{
        width: 61px;
    height: 47px;
    display: block;
    line-height: 42px;
    text-align: right;
    margin-right: 10px;
    float: left;
    overflow: hidden;
}
.com_form .com_text{
    margin-top: 19px;
    overflow: hidden;
    padding: 10px;
    border-radius: 5px;
    width: 67%;
    height: 79px;
    border: 1px solid #e0e0e0;
}
.com_form .com_text textarea{
    width: 100%;
    height: 80px;
    resize: none;
    border: 0;
}

.com_form .submit{
    width: 100px;
    height: 40px;
    border-radius: 5px;
    margin: 11px 27%;
    text-align: center;
    line-height: 36px;
}
.none{
    display:none;
}
</style>




<div class="clear"></div>
<!-- 文章分类列表 -->
<div class="catelist">
    <div class="lists listsov" >
    <dd>评论列表</dd> 
    </div>

</div>
<!-- /文章分类列表 -->

<table border="1"  class="table table-hover text-center" id='list'>
  <tr class="trcolor">
   	<td class="color12">会员</td>
	<td>评论内容</td>
    <td>上传图片</td>
    <td>评论时间</td>
    <td>回复</td>
    <td colspan="2">操作</td>
 
  </tr>

<!-- ============================================================= -->

<volist name="list" id="li">
  <tr>
    <td>{$li.name}</td>
    <td class="color12 kd">{$li.content}</td>
    <td class="pc"> 
    <if condition = "$li.piclist">
     <volist name ="li.piclist" id = "vi">   
       <img src="http://wx.xiaomifengzc.com/{$vi.thumb_pic}"  class="pics" > 
     </volist>
    </if>
    </td>
    <td class="color12">{$li.ctime}</td>
    <td class="color12"><if condition="$li['explain'] eq 1 ">是<else /> 否</if></td>
    <td><span class="addname">
    <a href="javascript:;" class="recoment" data-order = "{$li.order_id}" data-id = "{$li.id}">回复</a></span></td>
    <td><span class="addname"><a href="{:U('Product/delpro',array('id'=>$li[id],'case_id'=>$_GET[case_id]))}" onclick="return confirm('确定将此记录删除?')">删除</a></span></td>
  </tr>
</volist> 

<!-- ============================================================= -->

</table>
<div class="pages"> 
    <div class="page_s fr">{$page}</div>
</div>


<div class="wrap none" id = "J_wrap"></div>
<div class="comment none" id = "J_comment">
    <div class="title"><h3>添加回复</h3></div>
    <div class="close" id= "J_close">X</div>
    <div class="com_form">
        <form action="" id = "J_form" method ="post"> 
          <input type="hidden" name ="goods_id" value = "{$_GET['id']}">
          <input type="hidden" name = "order_id" id = "J_order_id" value = ''>
          <input type="hidden" id = "J_id" name = "uid" valus = "">
          <label for="comment">回复</label>
          <div class = "com_text">
              <textarea name="content" placeholder = "请输入回复内容" id="" ></textarea>
          </div>
            
            <div class="submit">
                <a href="javascript:;" id = "J_submit">提交</a>
            </div>
        </form>
    </div>

</div>
<!-- 提示 -->
<script>
    $(function(){
       $(".recoment").click(function(){
           var id  =$(this).attr('data-id');
           var order_id  =$(this).attr('data-order');
           $("#J_id").val(id);
           $("#J_order_id").val(order_id);
           $("#J_wrap").removeClass('none');
           $("#J_comment").fadeIn();
       });

        $("#J_close").click(function(){
          $("#J_wrap").addClass('none');
           $("#J_comment").fadeOut(); 
        });

        $("#J_submit").click(function(){
            var url = "{:U('Product/explainComment')}";
            var data = $('#J_form').serializeArray(); 
            $.ajax({
                    type: "POST",
                    dataType: 'json',
                    async: false,
                    url: url,
                    data: data,
                    success: function(res){
                        if (res.status == '1') {
                            alert("回复成功");
                            window.location.reload();
                        }else{
                            alert("回复失败");
                            return false;
                        }
                    },
                    error: function(){
                    },
            });
        });
    });
</script>
</body>
</html>